package com.asset.dispoal.business.repayment.domain.db.mapper;

import com.asset.dispoal.business.bsCase.domain.db.entity.BsCaseMediation;
import com.asset.dispoal.business.casedispose.dto.CaseDisposePageResponse;
import com.asset.dispoal.business.repayment.dto.RepaymentRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import tech.mhuang.pacebox.springboot.protocol.data.Page;

import java.util.List;
import java.util.Map;

/**
 * @description:
 * @author: yf
 * @date: 2022-09-26 14:54:14
 */
@Mapper
public interface RepaymentMapper {
    /**
     * 分页查询列表条数
     *
     * @param repaymentRequest
     * @return
     */
    Integer count(RepaymentRequest repaymentRequest);

    /**
     * 条件查询分页列表
     *
     * @param page
     * @return
     */
    List<CaseDisposePageResponse> queryPage(Page<RepaymentRequest> page);

    /**
     * 根据公式id获取计算信息
     *
     * @param id
     * @return
     */
    Map<String, String> getFormulaInfoById(String id);

    /**
     * 获取计算列表
     *
     * @param dataMap
     * @param caseId
     * @param batchParameterId
     * @return
     */
    List<Map<String, Object>> queryFormularAndBorrower(@Param("ListMap") List<Map<String, String>> dataMap,
                                                       @Param("caseId") String caseId,
                                                       @Param("batchParameterId") String batchParameterId);

    /**
     * 获取案件调解状态的案件信息
     *
     * @param caseId 案件id
     * @return
     */
    List<BsCaseMediation> getBsCaseMeditionByCaseId(String caseId);
}
